package com.yonyou.pmclouds.projecttype.mapper;

import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import com.yonyou.pmclouds.projecttype.entity.ProjectTypeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ProjectTypeMapper extends BaseMapper<ProjectTypeVO> {



    ProjectTypeVO[] queryVOBySrcIds(@Param("tenantid") String tenantid,
                                    @Param("srcids") String[] srcids);

    ProjectTypeVO[] queryNamesByIds(@Param("ids") String[] ids);

    String queryNameById(@Param("id") String id);
    //判断一级类别下的scode和sname
    ProjectTypeVO[] queryFirstCategory(@Param("pkTenant")String pkTenant);
    //判断scode或者sname是否存在
    ProjectTypeVO[] queryRepetition(@Param("pkParent") String pkParent, @Param("pkRoot") String pkRoot,@Param("pkTenant")String pkTenant);
    //判断是否存在下节点
    int  chirdrenCount(@Param("pkParent") String pkParent,@Param("pkTenant") String pkTenant);
    //查询所有项目类型档案
    ProjectTypeVO[] queryList(@Param("pkTenant")String pkTenant,@Param("enableStatus")byte enableStatus);
    //判读父节点是否启动
    ProjectTypeVO isEnable(@Param("pkParent")String pkParent,@Param("pkTenant")String pkTenant);
    //查询出该节点下的所有的启用的节点
    ProjectTypeVO[] queryAllEnable(@Param("scode")String scode,@Param("pkTenant")String pkTenant,@Param("enableStatus")byte enableStatus);
}
